3.2.79 \(\int (a+b \sec ^2(c+d x))^4 \, dx\) [179]

3.2.79.1 Optimal result
3.2.79.2 Mathematica [A] (verified)
3.2.79.3 Rubi [A] (verified)
3.2.79.4 Maple [A] (verified)
3.2.79.5 Fricas [A] (verification not implemented)
3.2.79.6 Sympy [F]
3.2.79.7 Maxima [A] (verification not implemented)
3.2.79.8 Giac [A] (verification not implemented)
3.2.79.9 Mupad [B] (verification not implemented)

3.2.79.1 Optimal result

Integrand size = 14, antiderivative size = 111 \[ \int \left (a+b \sec ^2(c+d x)\right )^4 \, dx=a^4 x+\frac {b (2 a+b) \left (2 a^2+2 a b+b^2\right ) \tan (c+d x)}{d}+\frac {b^2 \left (6 a^2+8 a b+3 b^2\right ) \tan ^3(c+d x)}{3 d}+\frac {b^3 (4 a+3 b) \tan ^5(c+d x)}{5 d}+\frac {b^4 \tan ^7(c+d x)}{7 d} \]

output
a^4*x+b*(2*a+b)*(2*a^2+2*a*b+b^2)*tan(d*x+c)/d+1/3*b^2*(6*a^2+8*a*b+3*b^2) 
*tan(d*x+c)^3/d+1/5*b^3*(4*a+3*b)*tan(d*x+c)^5/d+1/7*b^4*tan(d*x+c)^7/d
 
3.2.79.2 Mathematica [A] (verified)

Time = 3.60 (sec) , antiderivative size = 106, normalized size of antiderivative = 0.95 \[ \int \left (a+b \sec ^2(c+d x)\right )^4 \, dx=\frac {105 a^4 d x+105 b \left (4 a^3+6 a^2 b+4 a b^2+b^3\right ) \tan (c+d x)+35 b^2 \left (6 a^2+8 a b+3 b^2\right ) \tan ^3(c+d x)+21 b^3 (4 a+3 b) \tan ^5(c+d x)+15 b^4 \tan ^7(c+d x)}{105 d} \]

input
Integrate[(a + b*Sec[c + d*x]^2)^4,x]
 
output
(105*a^4*d*x + 105*b*(4*a^3 + 6*a^2*b + 4*a*b^2 + b^3)*Tan[c + d*x] + 35*b 
^2*(6*a^2 + 8*a*b + 3*b^2)*Tan[c + d*x]^3 + 21*b^3*(4*a + 3*b)*Tan[c + d*x 
]^5 + 15*b^4*Tan[c + d*x]^7)/(105*d)
 
3.2.79.3 Rubi [A] (verified)

Time = 0.27 (sec) , antiderivative size = 109, normalized size of antiderivative = 0.98, number of steps used = 5, number of rules used = 4, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.286, Rules used = {3042, 4616, 300, 2009}

Below are the steps used by Rubi to obtain the solution. The rule number used for the transformation is given above next to the arrow. The rules definitions used are listed below.

\(\displaystyle \int \left (a+b \sec ^2(c+d x)\right )^4 \, dx\)

\(\Big \downarrow \) 3042

\(\displaystyle \int \left (a+b \sec (c+d x)^2\right )^4dx\)

\(\Big \downarrow \) 4616

\(\displaystyle \frac {\int \frac {\left (b \tan ^2(c+d x)+a+b\right )^4}{\tan ^2(c+d x)+1}d\tan (c+d x)}{d}\)

\(\Big \downarrow \) 300

\(\displaystyle \frac {\int \left (b^4 \tan ^6(c+d x)+b^3 (4 a+3 b) \tan ^4(c+d x)+b^2 \left (6 a^2+8 b a+3 b^2\right ) \tan ^2(c+d x)+b (2 a+b) \left (2 a^2+2 b a+b^2\right )+\frac {a^4}{\tan ^2(c+d x)+1}\right )d\tan (c+d x)}{d}\)

\(\Big \downarrow \) 2009

\(\displaystyle \frac {a^4 \arctan (\tan (c+d x))+\frac {1}{3} b^2 \left (6 a^2+8 a b+3 b^2\right ) \tan ^3(c+d x)+b (2 a+b) \left (2 a^2+2 a b+b^2\right ) \tan (c+d x)+\frac {1}{5} b^3 (4 a+3 b) \tan ^5(c+d x)+\frac {1}{7} b^4 \tan ^7(c+d x)}{d}\)

input
Int[(a + b*Sec[c + d*x]^2)^4,x]
 
output
(a^4*ArcTan[Tan[c + d*x]] + b*(2*a + b)*(2*a^2 + 2*a*b + b^2)*Tan[c + d*x] 
 + (b^2*(6*a^2 + 8*a*b + 3*b^2)*Tan[c + d*x]^3)/3 + (b^3*(4*a + 3*b)*Tan[c 
 + d*x]^5)/5 + (b^4*Tan[c + d*x]^7)/7)/d
 

3.2.79.3.1 Defintions of rubi rules used

rule 300
Int[((a_) + (b_.)*(x_)^2)^(p_)*((c_) + (d_.)*(x_)^2)^(q_), x_Symbol] :> Int 
[PolynomialDivide[(a + b*x^2)^p, (c + d*x^2)^(-q), x], x] /; FreeQ[{a, b, c 
, d}, x] && NeQ[b*c - a*d, 0] && IGtQ[p, 0] && ILtQ[q, 0] && GeQ[p, -q]
 

rule 2009
Int[u_, x_Symbol] :> Simp[IntSum[u, x], x] /; SumQ[u]
 

rule 3042
Int[u_, x_Symbol] :> Int[DeactivateTrig[u, x], x] /; FunctionOfTrigOfLinear 
Q[u, x]
 

rule 4616
Int[((a_) + (b_.)*sec[(e_.) + (f_.)*(x_)]^2)^(p_), x_Symbol] :> With[{ff = 
FreeFactors[Tan[e + f*x], x]}, Simp[ff/f   Subst[Int[(a + b + b*ff^2*x^2)^p 
/(1 + ff^2*x^2), x], x, Tan[e + f*x]/ff], x]] /; FreeQ[{a, b, e, f, p}, x] 
&& NeQ[a + b, 0] && NeQ[p, -1]
 
3.2.79.4 Maple [A] (verified)

Time = 1.08 (sec) , antiderivative size = 130, normalized size of antiderivative = 1.17

method result size
derivativedivides \(\frac {a^{4} \left (d x +c \right )+4 a^{3} b \tan \left (d x +c \right )-6 a^{2} b^{2} \left (-\frac {2}{3}-\frac {\sec \left (d x +c \right )^{2}}{3}\right ) \tan \left (d x +c \right )-4 a \,b^{3} \left (-\frac {8}{15}-\frac {\sec \left (d x +c \right )^{4}}{5}-\frac {4 \sec \left (d x +c \right )^{2}}{15}\right ) \tan \left (d x +c \right )-b^{4} \left (-\frac {16}{35}-\frac {\sec \left (d x +c \right )^{6}}{7}-\frac {6 \sec \left (d x +c \right )^{4}}{35}-\frac {8 \sec \left (d x +c \right )^{2}}{35}\right ) \tan \left (d x +c \right )}{d}\) \(130\)
default \(\frac {a^{4} \left (d x +c \right )+4 a^{3} b \tan \left (d x +c \right )-6 a^{2} b^{2} \left (-\frac {2}{3}-\frac {\sec \left (d x +c \right )^{2}}{3}\right ) \tan \left (d x +c \right )-4 a \,b^{3} \left (-\frac {8}{15}-\frac {\sec \left (d x +c \right )^{4}}{5}-\frac {4 \sec \left (d x +c \right )^{2}}{15}\right ) \tan \left (d x +c \right )-b^{4} \left (-\frac {16}{35}-\frac {\sec \left (d x +c \right )^{6}}{7}-\frac {6 \sec \left (d x +c \right )^{4}}{35}-\frac {8 \sec \left (d x +c \right )^{2}}{35}\right ) \tan \left (d x +c \right )}{d}\) \(130\)
parts \(a^{4} x -\frac {b^{4} \left (-\frac {16}{35}-\frac {\sec \left (d x +c \right )^{6}}{7}-\frac {6 \sec \left (d x +c \right )^{4}}{35}-\frac {8 \sec \left (d x +c \right )^{2}}{35}\right ) \tan \left (d x +c \right )}{d}+\frac {4 a^{3} b \tan \left (d x +c \right )}{d}-\frac {6 a^{2} b^{2} \left (-\frac {2}{3}-\frac {\sec \left (d x +c \right )^{2}}{3}\right ) \tan \left (d x +c \right )}{d}-\frac {4 a \,b^{3} \left (-\frac {8}{15}-\frac {\sec \left (d x +c \right )^{4}}{5}-\frac {4 \sec \left (d x +c \right )^{2}}{15}\right ) \tan \left (d x +c \right )}{d}\) \(134\)
risch \(a^{4} x +\frac {8 i b \left (105 a^{3} {\mathrm e}^{12 i \left (d x +c \right )}+630 a^{3} {\mathrm e}^{10 i \left (d x +c \right )}+315 a^{2} b \,{\mathrm e}^{10 i \left (d x +c \right )}+1575 a^{3} {\mathrm e}^{8 i \left (d x +c \right )}+1365 a^{2} b \,{\mathrm e}^{8 i \left (d x +c \right )}+560 a \,b^{2} {\mathrm e}^{8 i \left (d x +c \right )}+2100 a^{3} {\mathrm e}^{6 i \left (d x +c \right )}+2310 a^{2} b \,{\mathrm e}^{6 i \left (d x +c \right )}+1400 a \,b^{2} {\mathrm e}^{6 i \left (d x +c \right )}+420 b^{3} {\mathrm e}^{6 i \left (d x +c \right )}+1575 a^{3} {\mathrm e}^{4 i \left (d x +c \right )}+1890 a^{2} b \,{\mathrm e}^{4 i \left (d x +c \right )}+1176 a \,b^{2} {\mathrm e}^{4 i \left (d x +c \right )}+252 b^{3} {\mathrm e}^{4 i \left (d x +c \right )}+630 a^{3} {\mathrm e}^{2 i \left (d x +c \right )}+735 a^{2} b \,{\mathrm e}^{2 i \left (d x +c \right )}+392 a \,b^{2} {\mathrm e}^{2 i \left (d x +c \right )}+84 b^{3} {\mathrm e}^{2 i \left (d x +c \right )}+105 a^{3}+105 a^{2} b +56 a \,b^{2}+12 b^{3}\right )}{105 d \left ({\mathrm e}^{2 i \left (d x +c \right )}+1\right )^{7}}\) \(311\)
norman \(\frac {a^{4} x \tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{14}-a^{4} x +7 a^{4} x \tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{2}-21 a^{4} x \tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{4}+35 a^{4} x \tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{6}-35 a^{4} x \tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{8}+21 a^{4} x \tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{10}-7 a^{4} x \tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{12}-\frac {2 b \left (4 a^{3}+6 a^{2} b +4 a \,b^{2}+b^{3}\right ) \tan \left (\frac {d x}{2}+\frac {c}{2}\right )}{d}-\frac {2 b \left (4 a^{3}+6 a^{2} b +4 a \,b^{2}+b^{3}\right ) \tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{13}}{d}+\frac {4 b \left (36 a^{3}+42 a^{2} b +20 a \,b^{2}+3 b^{3}\right ) \tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{3}}{3 d}+\frac {4 b \left (36 a^{3}+42 a^{2} b +20 a \,b^{2}+3 b^{3}\right ) \tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{11}}{3 d}+\frac {8 b \left (700 a^{3}+630 a^{2} b +364 a \,b^{2}+53 b^{3}\right ) \tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{7}}{35 d}-\frac {2 b \left (900 a^{3}+870 a^{2} b +452 a \,b^{2}+129 b^{3}\right ) \tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{5}}{15 d}-\frac {2 b \left (900 a^{3}+870 a^{2} b +452 a \,b^{2}+129 b^{3}\right ) \tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{9}}{15 d}}{\left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{2}-1\right )^{7}}\) \(416\)
parallelrisch \(\frac {105 a^{4} \tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{14} x d +\left (-840 a^{3} b -1260 a^{2} b^{2}-840 a \,b^{3}-210 b^{4}\right ) \tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{13}-735 a^{4} \tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{12} x d +\left (5040 a^{3} b +5880 a^{2} b^{2}+2800 a \,b^{3}+420 b^{4}\right ) \tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{11}+2205 a^{4} \tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{10} x d +\left (-12600 a^{3} b -12180 a^{2} b^{2}-6328 a \,b^{3}-1806 b^{4}\right ) \tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{9}-3675 a^{4} \tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{8} x d +\left (16800 a^{3} b +15120 a^{2} b^{2}+8736 a \,b^{3}+1272 b^{4}\right ) \tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{7}+3675 a^{4} \tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{6} x d +\left (-12600 a^{3} b -12180 a^{2} b^{2}-6328 a \,b^{3}-1806 b^{4}\right ) \tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{5}-2205 a^{4} \tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{4} x d +\left (5040 a^{3} b +5880 a^{2} b^{2}+2800 a \,b^{3}+420 b^{4}\right ) \tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{3}+735 a^{4} \tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{2} x d +\left (-840 a^{3} b -1260 a^{2} b^{2}-840 a \,b^{3}-210 b^{4}\right ) \tan \left (\frac {d x}{2}+\frac {c}{2}\right )-105 a^{4} x d}{105 d \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{2}-1\right )^{7}}\) \(419\)

input
int((a+b*sec(d*x+c)^2)^4,x,method=_RETURNVERBOSE)
 
output
1/d*(a^4*(d*x+c)+4*a^3*b*tan(d*x+c)-6*a^2*b^2*(-2/3-1/3*sec(d*x+c)^2)*tan( 
d*x+c)-4*a*b^3*(-8/15-1/5*sec(d*x+c)^4-4/15*sec(d*x+c)^2)*tan(d*x+c)-b^4*( 
-16/35-1/7*sec(d*x+c)^6-6/35*sec(d*x+c)^4-8/35*sec(d*x+c)^2)*tan(d*x+c))
 
3.2.79.5 Fricas [A] (verification not implemented)

Time = 0.25 (sec) , antiderivative size = 130, normalized size of antiderivative = 1.17 \[ \int \left (a+b \sec ^2(c+d x)\right )^4 \, dx=\frac {105 \, a^{4} d x \cos \left (d x + c\right )^{7} + {\left (4 \, {\left (105 \, a^{3} b + 105 \, a^{2} b^{2} + 56 \, a b^{3} + 12 \, b^{4}\right )} \cos \left (d x + c\right )^{6} + 2 \, {\left (105 \, a^{2} b^{2} + 56 \, a b^{3} + 12 \, b^{4}\right )} \cos \left (d x + c\right )^{4} + 15 \, b^{4} + 6 \, {\left (14 \, a b^{3} + 3 \, b^{4}\right )} \cos \left (d x + c\right )^{2}\right )} \sin \left (d x + c\right )}{105 \, d \cos \left (d x + c\right )^{7}} \]

input
integrate((a+b*sec(d*x+c)^2)^4,x, algorithm="fricas")
 
output
1/105*(105*a^4*d*x*cos(d*x + c)^7 + (4*(105*a^3*b + 105*a^2*b^2 + 56*a*b^3 
 + 12*b^4)*cos(d*x + c)^6 + 2*(105*a^2*b^2 + 56*a*b^3 + 12*b^4)*cos(d*x + 
c)^4 + 15*b^4 + 6*(14*a*b^3 + 3*b^4)*cos(d*x + c)^2)*sin(d*x + c))/(d*cos( 
d*x + c)^7)
 
3.2.79.6 Sympy [F]

\[ \int \left (a+b \sec ^2(c+d x)\right )^4 \, dx=\int \left (a + b \sec ^{2}{\left (c + d x \right )}\right )^{4}\, dx \]

input
integrate((a+b*sec(d*x+c)**2)**4,x)
 
output
Integral((a + b*sec(c + d*x)**2)**4, x)
 
3.2.79.7 Maxima [A] (verification not implemented)

Time = 0.19 (sec) , antiderivative size = 134, normalized size of antiderivative = 1.21 \[ \int \left (a+b \sec ^2(c+d x)\right )^4 \, dx=a^{4} x + \frac {2 \, {\left (\tan \left (d x + c\right )^{3} + 3 \, \tan \left (d x + c\right )\right )} a^{2} b^{2}}{d} + \frac {4 \, {\left (3 \, \tan \left (d x + c\right )^{5} + 10 \, \tan \left (d x + c\right )^{3} + 15 \, \tan \left (d x + c\right )\right )} a b^{3}}{15 \, d} + \frac {{\left (5 \, \tan \left (d x + c\right )^{7} + 21 \, \tan \left (d x + c\right )^{5} + 35 \, \tan \left (d x + c\right )^{3} + 35 \, \tan \left (d x + c\right )\right )} b^{4}}{35 \, d} + \frac {4 \, a^{3} b \tan \left (d x + c\right )}{d} \]

input
integrate((a+b*sec(d*x+c)^2)^4,x, algorithm="maxima")
 
output
a^4*x + 2*(tan(d*x + c)^3 + 3*tan(d*x + c))*a^2*b^2/d + 4/15*(3*tan(d*x + 
c)^5 + 10*tan(d*x + c)^3 + 15*tan(d*x + c))*a*b^3/d + 1/35*(5*tan(d*x + c) 
^7 + 21*tan(d*x + c)^5 + 35*tan(d*x + c)^3 + 35*tan(d*x + c))*b^4/d + 4*a^ 
3*b*tan(d*x + c)/d
 
3.2.79.8 Giac [A] (verification not implemented)

Time = 0.31 (sec) , antiderivative size = 148, normalized size of antiderivative = 1.33 \[ \int \left (a+b \sec ^2(c+d x)\right )^4 \, dx=\frac {15 \, b^{4} \tan \left (d x + c\right )^{7} + 84 \, a b^{3} \tan \left (d x + c\right )^{5} + 63 \, b^{4} \tan \left (d x + c\right )^{5} + 210 \, a^{2} b^{2} \tan \left (d x + c\right )^{3} + 280 \, a b^{3} \tan \left (d x + c\right )^{3} + 105 \, b^{4} \tan \left (d x + c\right )^{3} + 105 \, {\left (d x + c\right )} a^{4} + 420 \, a^{3} b \tan \left (d x + c\right ) + 630 \, a^{2} b^{2} \tan \left (d x + c\right ) + 420 \, a b^{3} \tan \left (d x + c\right ) + 105 \, b^{4} \tan \left (d x + c\right )}{105 \, d} \]

input
integrate((a+b*sec(d*x+c)^2)^4,x, algorithm="giac")
 
output
1/105*(15*b^4*tan(d*x + c)^7 + 84*a*b^3*tan(d*x + c)^5 + 63*b^4*tan(d*x + 
c)^5 + 210*a^2*b^2*tan(d*x + c)^3 + 280*a*b^3*tan(d*x + c)^3 + 105*b^4*tan 
(d*x + c)^3 + 105*(d*x + c)*a^4 + 420*a^3*b*tan(d*x + c) + 630*a^2*b^2*tan 
(d*x + c) + 420*a*b^3*tan(d*x + c) + 105*b^4*tan(d*x + c))/d
 
3.2.79.9 Mupad [B] (verification not implemented)

Time = 18.71 (sec) , antiderivative size = 119, normalized size of antiderivative = 1.07 \[ \int \left (a+b \sec ^2(c+d x)\right )^4 \, dx=\frac {\mathrm {tan}\left (c+d\,x\right )\,\left (4\,b\,{\left (a+b\right )}^3+4\,b^3\,\left (a+b\right )-6\,b^2\,{\left (a+b\right )}^2-b^4\right )+{\mathrm {tan}\left (c+d\,x\right )}^3\,\left (2\,b^2\,{\left (a+b\right )}^2-\frac {4\,b^3\,\left (a+b\right )}{3}+\frac {b^4}{3}\right )+\frac {b^4\,{\mathrm {tan}\left (c+d\,x\right )}^7}{7}+{\mathrm {tan}\left (c+d\,x\right )}^5\,\left (\frac {4\,b^3\,\left (a+b\right )}{5}-\frac {b^4}{5}\right )+a^4\,d\,x}{d} \]

input
int((a + b/cos(c + d*x)^2)^4,x)
 
output
(tan(c + d*x)*(4*b*(a + b)^3 + 4*b^3*(a + b) - 6*b^2*(a + b)^2 - b^4) + ta 
n(c + d*x)^3*(2*b^2*(a + b)^2 - (4*b^3*(a + b))/3 + b^4/3) + (b^4*tan(c + 
d*x)^7)/7 + tan(c + d*x)^5*((4*b^3*(a + b))/5 - b^4/5) + a^4*d*x)/d